<template>
  <el-form-item label="跳过表达式">
    <el-input v-model="elementSkipExpression" @change="updateElementSkipExpression" />
  </el-form-item>
</template>
    
<script lang="ts">
import { defineComponent } from 'vue';
import { mapState } from 'pinia';
import modelerStore from '@wf/components/bpmnjs/store/modeler';
import { getSkipExpressionValue, setSkipExpressionValue } from '@wf/components/bpmnjs/bo-utils/conditionUtil';

export default defineComponent({
  name: 'ElementBasicGatewayInfo',
  data() {
    return {
      elementSkipExpression: ''
    };
  },
  computed: {
    ...mapState(modelerStore, ['getActive', 'getActiveId'])
  },
  mounted() {
    this.init();
  },
  methods: {
    init() {
      this.elementSkipExpression = getSkipExpressionValue(this.getActive) || '';
    },
    updateElementSkipExpression(value: string) {
      setSkipExpressionValue(this.getActive, value);
    }
  }
});
</script>
    